1. Technical Field
The disclosure relates to electronic devices, and particularly to an electronic device capable of controlling state of its components and a method for controlling state of components in the electronic device.
2. Description of Related Art
A touch switch is usually used in a notebook computer for changing working states of the notebook computer through the operation of opening and closing the lid of the notebook computer, for example, turning off the display screen or controlling the notebook computer to enter into a sleep mode. Mode-switching is often achieved via closing the lid to touch with main body of the notebook computer. However, a touch switch often has limited service life and can be easily damaged by repeated closings and openings of the lid.
Therefore, it is useful to provide an electronic device for controlling the state of components in the electronic device to overcome the above-mentioned shortcoming.